package com.jinzihan.dao.impl;

import com.jinzihan.dao.ManagerDao;
import com.jinzihan.entity.Manager;

public class ManagerDaoImpl extends BaseDao implements ManagerDao {
    @Override
    public Manager queryManagerByUsername(String username) {
        String sql = "select `manager_id` managerId,`username`,`password` from t_manager where username = ?";
        return queryForOne(Manager.class,sql,username);
    }

    @Override
    public Manager queryManagerByUsernameAndPassword(String username, String password) {
        String sql = "select `username`,`password`,`manager_id` managerId from t_manager where username = ? and password = ?";
        return queryForOne(Manager.class,sql,username,password);
    }
}
